<template>
	<view class="address_box u-border-bottom u-border-top" @click="$emit('handleAddres')">
		<view class="map_left" v-if="address">
			<u-icon size="40" name="map"></u-icon>
			<view class="address_content">
				<view class="name_phone">
					<view class="name">
						{{address.contactName}}
					</view>
					<view class="phone">
						{{address.contactPhone}}
					</view>
				</view>
				<view class="address_msg">
					{{address.location}}-{{address.street}}
				</view>
			</view>
		</view>
		<u-icon name="arrow-right" v-if="address"></u-icon>
		<view class="empty_addres" v-if="!address">
			暂无收货地址,点击选择
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			address: {
				default: null
			}
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss" lang="scss">
	.empty_addres {
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 36rpx;
		width: 100%;
		padding: 40rpx 0;
	}

	.address_box {
		width: 100%;
		display: flex;
		align-items: center;
		padding: 20rpx;

		.map_left {
			display: flex;
			align-items: center;
			width: 100%;
		}

		.address_content {
			display: flex;
			flex-direction: column;
			margin-left: 20rpx;

			.name_phone {
				display: flex;

				.name {
					font-size: 32rpx;
					color: #000000;
					margin-right: 6rpx;
					font-weight: 600;
				}

				.phone {
					font-size: 28rpx;
					color: #000000;
				}
			}

		}
	}
</style>
